#ifndef EDITORCORE_ENTITYTRAVERSER_H
#define EDITORCORE_ENTITYTRAVERSER_H

#include <set>
#include "EditorCore/IEntity.h"
#include "EditorCore/Visitors/IEntityVisitor.h"

namespace editor_core {

	class EntityTraverser
	{
	public:
		virtual ~EntityTraverser() {}

		void Traverse( IEntity* entity, IEntityVisitor* visitor );

	protected:
		virtual void InnerTraverse( IEntity* entity, IEntityVisitor* visitor, std::set<int>& visitedEntities ) = 0;

	private:
		std::set<int> m_visitedEntities;
	};
}

#endif
